package com.cabal.job;

import com.cabal.auth.service.ICabalAuthService;
import com.cabal.notice.service.CabalNoticeService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * 定时公告定时任务
 * 
 * @author SK
 * @date 2024年9月5日
 *
 */
@Component
@Slf4j
public class CabalLoginNoticeJob {

	@Autowired
	private CabalNoticeService cabalNoticeService;

	@Scheduled(cron="${cabal-login-notice-cron:0/5 * * * * ?}")   // 每1分钟执行一次
	public void updateOnlineUserCash() {
		cabalNoticeService.loginNoticeJob();
	}
}